package com.lgrousset.loanssimulator.client.chart.event;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;

public class LoanAmountChangedEvent extends GwtEvent<LoanAmountChangedEvent.Handler> {
	/**
	 * Interface to describe this event. Handlers must implement.
	 */
	public interface Handler extends EventHandler {
		public void onChange(LoanAmountChangedEvent p);
	}

	public LoanAmountChangedEvent(){
		
	}
	
	@Override
	protected void dispatch(LoanAmountChangedEvent.Handler handler) {
		handler.onChange(this);
	}

	@Override
	public GwtEvent.Type<LoanAmountChangedEvent.Handler> getAssociatedType() {
		return TYPE;
	}

	public static HandlerRegistration register(EventBus eventBus, LoanAmountChangedEvent.Handler handler) {
		return eventBus.addHandler(TYPE, handler);
	}

	public static final GwtEvent.Type<LoanAmountChangedEvent.Handler> TYPE = new GwtEvent.Type<LoanAmountChangedEvent.Handler>();
}